//
// Created by bxc on 2022/12/13.
//

#include "SipClient.h"
#include "SipServerConfig.h"
#include "Utils/Log.h"
using namespace BXC;


int main(int argc, char *argv[]) {
    LOGI("");

    srand((int)time(NULL));   //每次执行种子不同，生成不同的随机数


    const char *serverIp = "192.168.1.3";
    int serverPort = 15060;
    const char *serverSipId = "34020000002000000001";
    const char *serverSipRealm = "3402000000";
    const char *serverSipPass = "123456789";
    int serverSipTimeout = 0;
    int serverSipExpiry = 3600;

    const char *clientUa = "BXC_SipClient";
    const char *clientIp = "192.168.1.3";
    int clientPort = 5060;
    const char *clientId = "34020000001310000001";
    int localRtpPort = 10011;// 本地RTP的推流端口

    SipServerConfig serverConfig(serverIp,serverPort,serverSipId,serverSipRealm,serverSipPass,serverSipTimeout,serverSipExpiry);
    SipClientConfig clientConfig(clientUa,clientIp,clientPort,clientId,localRtpPort);


    SipClient client(&serverConfig,&clientConfig);
    client.loop();

    return 0;
}